/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package negocio;

import controladores.AreaFacadeLocal;
import entidades.Area;
import entidades.Facultad;
import entidades.Programa;
import java.util.List;
import javax.annotation.Resource;
import javax.ejb.EJB;
import javax.ejb.EJBContext;
import javax.ejb.Stateless;
import javax.ejb.TransactionManagement;
import javax.ejb.TransactionManagementType;
import javax.transaction.UserTransaction;

/**
 *
 * @author BATAQUERO
 */
@Stateless(mappedName = "AreaEJB")
@TransactionManagement(TransactionManagementType.BEAN)
public class AreaSrv implements AreaInterface{
    @Resource
    private EJBContext context;
    private UserTransaction utx;
    
    @EJB
    private AreaFacadeLocal areaFacadeLocal;
    
    @Override
    public List<Area> listaAreasXPrograma(Programa idPrograma) {
        return areaFacadeLocal.listaAreasXPrograma(idPrograma);
    }

    @Override
    public List<Area> listaAreasXFacultad(Facultad idFacultad) {
        return areaFacadeLocal.listaAreasXFacultad(idFacultad);
    }
    
}
